# coding: utf-8
from . import db, BaseModel


class Document(BaseModel):
    __tablename__ = 'document'

    auto_id = db.Column(db.Integer, primary_key=True, info='自增主键')
    doc_id = db.Column(db.String(20, 'utf8mb4_0900_ai_ci'), nullable=False, info='文档ID')
    user_id = db.Column(db.String(20, 'utf8mb4_0900_ai_ci'), nullable=False, info='用户ID')
    doc_name = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), info='文档名称')
    doc_location = db.Column(db.String(500, 'utf8mb4_0900_ai_ci'), info='上传文档地址')
    ppt_id = db.Column(db.String(20, 'utf8mb4_0900_ai_ci'), nullable=False, info='PPT创建ID')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建时间')
    is_deleted = db.Column(db.Integer, server_default=db.FetchedValue(), info='是否删除')
